Fix kg_emb broken import: SampleBaseDataset -> SampleDataset, add pan… - #1192
Fix kg_emb broken import: SampleBaseDataset -> SampleDataset, add pan…#1192userjuma wants to merge 1 commit into
Conversation
…darallel dependency
|
Thanks for this. The I think one step is missing though. The module imports, but Two smaller notes:
Worth saying that #952 asked for the rename across eight files and your PR does I've opened #1202 going after the root cause, and credited you in the |
Closes #952
Fixes the broken import in
kg_embcaused bySampleBaseDatasetbeing renamed toSampleDatasetin PyHealth 2.0. Updated across all 7 affected files (2 inkg_emb/datasets, 5 inkg_emb/models).Also adds
pandarallel(>=1.6.5) topyproject.toml. It is used inkg_emb/datasets/base_kg_dataset.pybut was previously missing from declared dependencies, which caused aModuleNotFoundErrorimmediately after the dataset rename was resolved.Added
tests/core/test_kg_emb.pycovering:1.Clean import of the
kg_embmodule2. Importability of all five
kg_embmodel classes3.A regression check ensuring
TransE's dataset parameter is explicitly typed asSampleDatasetManual verification:
Reproduced the original crash via
python -c "import pyhealth.medcode.pretrained_embeddings"and confirmed it now resolves cleanly end-to-end.